/************************************************************************
 * The code is owned by mainframer.cn and Shang Tao
 * Without aproval of mainframer.cn and Shang Tao, removing the copyright
 * infomation is regarded as invassion of proprietary copyright
 ***********************************************************************/
package com.mr.qa.bo;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;



public class User extends BaseBO
{


    // Fields    
    private String loginName;
    private String password;
    private String name;
    private String signature;
    private String mobile;
    private String email;
    private String state;//0 normal 1 can not login
    private String type;//0 common user, 1 administrator
    private String group;//the group family seleted by the user
    
    //
    private String passwordQuestion;
    private String passwordAnswer;
    
    private Date registerDate;
    private Date lastLoginDate;
    
    private Boolean isSuper;
    
    private Boolean isEmailPublic = false;
    
    private UserScore userScore;
    private UserMoney userMoney;
    private Set newMessages = new HashSet(0);   
    private Set receivedMessages = new HashSet(0);
    private Set sentMessages = new HashSet(0);
    private Set userScoreHistories = new HashSet(0);
    private Set userMoneySpendHistories = new HashSet(0);
    
    private Set questions = new HashSet(0);
    private Set answers = new HashSet(0);
    private Set mylinks = new HashSet(0);
    private Set comments = new HashSet(0);
    
    //2008-6-24 
    private String permissions = "";
    //2008.12.28 16:17 Singapore Simei
    private Integer questionsCount;
    private Integer answersCount;
    
    private Boolean isActive;
    
    //2009-07-30 added by pengfei
    private String headerImage;
    
    // Constructors

    /** default constructor */
    public User() {
    }

    public User(String loginName, String password, String type, Date registerDate, Date lastLoginDate) {
        this.loginName = loginName;
        this.password = password;
        this.type = type;
        this.registerDate = registerDate;
        this.lastLoginDate = lastLoginDate;
    }
    
    // Property accessors

    public User(Integer id, String loginName, String password, String name, String signature, String mobile, String email, String state, String type, Date registerDate, Date lastLoginDate, UserScore userScore) {
		this.id = id;
		this.loginName = loginName;
		this.password = password;
		this.name = name;
		this.signature = signature;
		this.mobile = mobile;
		this.email = email;
		this.state = state;
		this.type = type;
		this.registerDate = registerDate;
		this.lastLoginDate = lastLoginDate;
		this.userScore = userScore;
	}

	
    public String getLoginName() {
        return this.loginName;
    }
    
    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return this.password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }

    public String getSignature() {
        return this.signature;
    }
    
    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getMobile() {
        return this.mobile;
    }
    
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return this.email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }

    public String getState() {
        return this.state;
    }
    
    public void setState(String state) {
        this.state = state;
    }

    public String getType() {
        return this.type;
    }
    
    public void setType(String type) {
        this.type = type;
    }

    public Date getRegisterDate() {
        return this.registerDate;
    }
    
    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public Date getLastLoginDate() {
        return this.lastLoginDate;
    }
    
    public void setLastLoginDate(Date lastLoginDate) {
        this.lastLoginDate = lastLoginDate;
    }

	public UserScore getUserScore() {
		return userScore;
	}

	public void setUserScore(UserScore userScore) {
		this.userScore = userScore;
	}
	
	public UserMoney getUserMoney() {
		return userMoney;
	}

	public void setUserMoney(UserMoney userMoney) {
		this.userMoney = userMoney;
	}

	/*        
        public void setUserScoreHistories(Set userScoreHistories)
        {
            this.userScoreHistories = userScoreHistories;
        }
        
        public Set getUserScoreHistories()
        {
            return userScoreHistories;
        }
*/
    public void setGroup(String group)
    {
        this.group = group;
    }
    
    public String getGroup()
    {
        return group;
    }

    public void setQuestions(Set questions)
    {
        this.questions = questions;
    }
    
    public Set getQuestions()
    {
        return questions;
    }
    
    public void setAnswers(Set answers)
    {
        this.answers = answers;
    }
    
    public Set getAnswers()
    {
        return answers;
    }

    public void setMylinks(Set mylinks)
    {
        this.mylinks = mylinks;
    }
    
    public Set getMylinks()
    {
        return mylinks;
    }

    public void setComments(Set comments)
    {
        this.comments = comments;
    }
    
    public Set getComments()
    {
        return comments;
    }

    public void setPasswordQuestion(String passwordQuestion)
    {
        this.passwordQuestion = passwordQuestion;
    }
    
    public String getPasswordQuestion()
    {
        return passwordQuestion;
    }
    
    public void setPasswordAnswer(String passwordAnswer)
    {
        this.passwordAnswer = passwordAnswer;
    }
    
    public String getPasswordAnswer()
    {
        return passwordAnswer;
    }

    public void setIsSuper(boolean isSuper)
    {
        this.isSuper = isSuper;
    }
    
    public boolean getIsSuper()
    {
        return isSuper;
    }
    
    public void setIsEmailPublic(Boolean isEmailPublic)
    {
        this.isEmailPublic = isEmailPublic;
    }
    
    public Boolean getIsEmailPublic()
    {
        return isEmailPublic;
    }

    public void setUserScoreHistories(Set userScoreHistories)
    {
        this.userScoreHistories = userScoreHistories;
    }
    
    public Set getUserScoreHistories()
    {
        return userScoreHistories;
    }
    

    public Set getUserMoneySpendHistories() {
		return userMoneySpendHistories;
	}

	public void setUserMoneySpendHistories(Set userMoneySpendHistories) {
		this.userMoneySpendHistories = userMoneySpendHistories;
	}

	public void setPermissions(String permissions)
    {
        this.permissions = permissions;
    }
    
    public String getPermissions()
    {
        return permissions;
    }

    public void setNewMessages(Set newMessages) {
        this.newMessages = newMessages;
    }

    public Set getNewMessages() {
        return newMessages;
    }

    public void setReceivedMessages(Set receivedMessages) {
        this.receivedMessages = receivedMessages;
    }

    public Set getReceivedMessages() {
        return receivedMessages;
    }

    public void setSentMessages(Set sentMessages) {
        this.sentMessages = sentMessages;
    }

    public Set getSentMessages() {
        return sentMessages;
    }

    public void setQuestionsCount(Integer questionsCount) {
        this.questionsCount = questionsCount;
    }

    public Integer getQuestionsCount() {
        return questionsCount;
    }

    public void setAnswersCount(Integer answersCount) {
        this.answersCount = answersCount;
    }

    public Integer getAnswersCount() {
        return answersCount;
    }

	public String getHeaderImage() {
		return headerImage;
	}

	public void setHeaderImage(String headerImage) {
		this.headerImage = headerImage;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}
    
    
}
